package image;

import math.vec2i;

public abstract class Image
{
    
    public vec2i mSize;
    
    
    public Image(vec2i aSize)
    {
        // Init the Image size:
        this.mSize = aSize.copy();
    }
    
    
    
    
    public abstract Image copy(
        vec2i aStart, 
        vec2i aSize
    );
    
    
    /** Returns the array index given a pixel location. */
    public int toIntIndex(vec2i aPixel)
    {
        int ind = aPixel.x + this.mSize.x * aPixel.y;
        return ind;
    }
    
}
